﻿Imports Microsoft.VisualBasic

Public Class DBUnitSP
    Inherits DBParentStoredProcedureClass

    Public Operation As New TableField("Operation", Data.SqlDbType.NVarChar)
    Public UnitID As New TableField("UnitID", Data.SqlDbType.Int)
    Public UnitNameAr As New TableField("UnitNameAr", Data.SqlDbType.NVarChar)
    Public UnitNameEn As New TableField("UnitNameEn", Data.SqlDbType.NVarChar)

    Sub New()
        MyBase.StoredProcedureName = "UnitSP"
    End Sub

    Public Shadows Function QueryDatabase(ByVal QueryType As SqlQueryType, _
                                 Optional ByVal Operation As String = "", _
                                 Optional ByVal UnitID As String = "", _
                                 Optional ByVal UnitNameAr As String = "", _
                                 Optional ByVal UnitNameEn As String = "") As Object

        MyBase.FieldsArrayList = New ArrayList
        Me.Operation.SetValue(Operation, MyBase.FieldsArrayList)
        Me.UnitID.SetValue(UnitID, MyBase.FieldsArrayList)
        Me.UnitNameAr.SetValue(UnitNameAr, MyBase.FieldsArrayList)
        Me.UnitNameEn.SetValue(UnitNameEn, MyBase.FieldsArrayList)
        
        Return MyBase.QueryDatabase(QueryType)
    End Function

End Class
